<template>
  <div>
    <div id="main" ref="main"></div>
    <el-button @click="addClass">添加动画</el-button>
  </div>
</template>
<style scoped>
#main {
  width: 500px;
  height: 500px;
  background-color: pink;
  border-radius: 50px;
}
</style>
<script>
    export default {
      name:'Test',
      methods:{
        addClass(){
          document.getElementById('main').setAttribute("class","animate__animated animate__lightSpeedInLeft")
        }
      }
    }
</script>
